<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<%@ include file="/commons/commonList.jsp"%>
<link href="${ctx}/styles/show.css" rel="stylesheet" type="text/css">
<style>
.room_space_house{
	text-align:left;
	padding-left:30px;
	color:#000;
	}
</style>
<script type="text/javascript">
var currentId="";
var currentCoalitionId= ""

    function resize(){
		parent.window.document.all('connTabPanel').style.height=document.body.scrollHeight;

	}

	function researchByCode(code,statusCount){
      setCurrentHouseId("");
      if(statusCount==0){
      return false;
      }
	window.location.href = "${ctx}/house_houseAction.do?method=housesIconList&buildingId=${buildingId}&houseStatusCode="+code;
    }



   function openHouseDetail(){
       var url = "${ctx}/house_houseAction.do?method=initHouseDetailMain&keyword="+currentId;
	   top.windowOpen(url, "houseDetail", "${key.room_detail}", 550, 750);
   }


   function setCurrentHouseId(houseId){
     currentId=houseId;
    parent.setCurrentHouseId(houseId);

   }

   function setCurrentCoalitionId(coalitionId) {
      parent.setCurrentCoalitionId(coalitionId);
   }




</script>
</head>
<body onload="resize()">
<div class="tab_bgline" >
<div style="overflow:auto; height:415px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab_line>

          <tr class="gridcontrol gridarea">
          <td width="17%" >&nbsp;&nbsp;&nbsp;&nbsp;${key.currnet_building_count}
           <script type="text/javascript">
           document.write(parent.getBuildingName());
           </script>
          </td>
        <td width="83%" class="align_right"><table border="0" align="right" cellpadding="0" cellspacing="0" id=secTable>
            <tr>
            <c:forEach var="statusCount" items="${houseStatusList}">
            <c:if test="${statusCount.houseStatusCode!='011'}">
            <td class="statusbarico"><a href="#" onFocus="this.blur();" onClick="researchByCode('${statusCount.houseStatusCode}','${statusCount.statusCount}');return false;"><img src="${ctx}/images/ico_house_${statusCount.houseStatusCode}.gif" alt=""  border="0" align="absmiddle"> ${statusCount.statusName}(${statusCount.statusCount})</a></td>
            </c:if>
            </c:forEach>

            </tr>
        </table></td>
          </tr>
          <tr>
            <td colspan="2"><table border=0 cellspacing=0 cellpadding=0 width=100% id=mainTable  >
            <tbody id="roomIcon">
             <tr>
                  <td align=center valign=top>


<ec:ceTable items="HouseIcomList"
				var="pre"
				action="${ctx}/house_houseAction.do?method=housesIconList&buildingId=${buildingId}"
				view="pmsview" sortable="true" width="100%" rowsDisplayed="9"
				autoIncludeParameters="true"
				cellspacing="1"
				cellpadding="0"
				styleClass="room_border" isShowTotalMessage="false">
				<ec:ceRow styleClass="d">
					<ec:ceColumn property="storey" styleClass="listTable_normal_word"
						headerCell="noHeadrCell" width="6%" title=" " ><c:if test="${pre.floor!=null}">${pre.floor}F</c:if>&#160;</ec:ceColumn>

					<ec:ceColumn headerCell="noHeadrCell" title=" " property="pre.houseIconList" styleClass="tdBodyContrl" showTitle="false">

								<c:forEach var="strs" items="${pre.houseIconList}">
								   <td class="td_listTable_record_off" width="${95/maxHouseCount}%"<c:if test="${strs.houseStatusCode!=null}">
								   onClick="setCurrentHouseId('${strs.keyword}');setCurrentCoalitionId('${strs.coalitionHouseId}');house_clickListTr(this);"
								   ondblclick="openHouseDetail();"
								   onContextMenu="this.onclick();return ShowContextMenu(event,'quick_rightmenu');"</c:if> align="left" class="td_listTable_record_off">

                                <c:if test="${strs.houseStatusCode!=null}">
                                   <img src="${ctx}/images/ico_house_${strs.houseStatusCode}.gif" alt=""  border="0" align="absmiddle">
                                   ${strs.houseNumber}
                                   <c:if test="${strs.renovation=='1'}">
		                              <img src="${ctx}/images/ico_shenpi_zong.gif"border="0" align="absbottom" alt="${key.room_repair}"/>
		                            </c:if>
		                            <c:if test="${strs.coalitionNumber!=null}">
		                              <div class="room_space_house"> ${key.coalitionNumber}${strs.coalitionNumber}<br>
                                    </div>
		                            </c:if>
		                             </c:if>
                                    </td>
								</c:forEach>


					</ec:ceColumn>
				</ec:ceRow>
</ec:ceTable>



                  </td>
                </tr>
              </tbody>
            </table></td>
            </tr>
            </table>

</div>


<div id="quick_rightmenu" style="display:none;"  oncontextmenu="return false" class="quick_rightmenu"onMouseOver="MM_showHideLayers('quick_rightmenu')"  onMouseOut="MM_showHideLayers('quick_rightmenu')">
<table width="100%" border="0" cellpadding="1" cellspacing="0" class="grid_quickMenu_bg">

	<tr>
      <td><table width="100%" border="0" cellpadding="2" cellspacing="0">

     	  <tr>
		   <td class="hrpading"></td>
          </tr>
           <pms:AuthTag authName="house_houseAction.do?method=initialHouseAdd">
            <tr>
		  <td class="quickMenu_toolbarico"><a href="#"  onclick="parent.openHouseAdd();return false;"onfocus="this.blur()"><img src="${ctx}/images/ico_newfile.gif" border="0" align="absbottom" alt="${key.add_room}"/>&nbsp;${key.add}</a></td>
          </tr>
          </pms:AuthTag>
          <pms:AuthTag authName="house_houseAction.do?method=initialHouseEdit">
          <tr>
          <td class="quickMenu_toolbarico"><a href="#"  onclick="parent.openHouseEdit();return false;"onfocus="this.blur()"><img src="${ctx}/images/ico_amend.gif" border="0" align="absbottom" alt="${key.edit}"/> ${key.edit}</a></td>
          </tr>
          </pms:AuthTag>
          <pms:AuthTag authName="house_houseAction.do?method=deleteHouse">
		  <tr>
          <td class="quickMenu_toolbarico"><a href="#"  onclick="parent.deleteHouse();return false;"onfocus="this.blur()"><img src="${ctx}/images/ico_delete.gif" border="0" align="absbottom" alt="${key.delete}"/> ${key.delete}</a></td>
          </tr>
           </pms:AuthTag>
          <pms:AuthTag authName="house_houseAction.do?method=initHouseStatePage">
          <tr>
            <td class="quickMenu_toolbarico"><a href="#"  onclick="parent.openChangeHouseState();return false;" onFocus="this.blur()"><img src="${ctx}/images/house_fw_hb.gif" border="0" align="absbottom" alt="${key.edit_room_states}"/>&nbsp;${key.edit_room_states}</a></td>
          </tr>
          </pms:AuthTag>
          <pms:AuthTag authName="menu.nopage.coalitionHousManage">
          <tr>
            <td class="quickMenu_toolbarico"><a href="#" onMouseOver="show2menu('quick_rightmenu5',this,event,'quick_rightmenu')" onMouseOut="hidden2menu('quick_rightmenu5')"><img src="${ctx}/images/house_hb.gif" border="0" align="absbottom" alt="${key.join_management}"/>&nbsp;${key.join_management}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="${ctx}/images/ico_index_start1.gif" border="0" /></a></td>
          </tr>
          </pms:AuthTag>
          <pms:AuthTag authName="house_meterAction.do?method=initMeterMaintenanceList">
		    <tr>
            <td class="quickMenu_toolbarico"><a href="#"  onclick="parent.openEditMeter();return false;" onFocus="this.blur()"><img src="${ctx}/images/ico_biao.gif" border="0" align="absbottom" alt="${key.meter_edit}"/>&nbsp;${key.meter_edit}</a></td>
          </tr>
        </pms:AuthTag>

      </table></td>
    </tr>
  </table>
<script type="text/javascript">

	var div1=document.getElementById('quick_rightmenu');
	if(div1.getElementsByTagName("tr").length==2){
	div1.innerHTML="";
	}
</script>
</div>
</div>

<div id="quick_rightmenu5" class="quick_menu2" style="display:none;">
  <table width="100%" border="0" cellpadding="1" cellspacing="0" class="grid_quickMenu_bg" onMouseOver="showmy2menu('quick_rightmenu5')" onMouseOut="hidden2menu('quick_rightmenu5')">

       <tr>
      <td><table width="100%" border="0" cellpadding="2" cellspacing="0">
      <pms:AuthTag authName="house_coalitionHouseAction.do?method=initCoalitionHouseAdd">
        <tr>
		<td class="quickMenu_toolbarico"><a href="#"  onclick="parent.openCoalitionHouse();return false;"onfocus="this.blur()"><img src="${ctx}/images/ico_newfile.gif" alt="" width="16" height="16" border="0" align="absbottom"> ${key.add}</a></td>
        </tr>
        </pms:AuthTag>
        <pms:AuthTag authName="house_coalitionHouseAction.do?method=initCoalitionHouseEdit">
		<tr>
          <td class="quickMenu_toolbarico"><a href="#"  onclick="parent.editCoalitionHouse();return false;"onfocus="this.blur()"><img src="${ctx}/images/ico_amend.gif" alt="" width="16" height="16" border="0" align="absbottom">${key.edit} </a></td>
          </tr>
         </pms:AuthTag>
        <pms:AuthTag authName="house_coalitionHouseAction.do?method=initCoalitionHouseDelete">
		  <tr>
		   <td class="hrpading"><table width="95%" border="0" align="left" cellpadding="0" cellspacing="0">
		     <tr><td class="quickMenu_line"></td></tr></table></td>
          </tr>

        <tr>
          <td class="quickMenu_toolbarico"><a href="#" onClick="parent.deleteCoalitionHouse();return false;" onFocus="this.blur()"><img src="${ctx}/images/ico_unchain.gif" alt="" width="16" height="16" border="0" align="absbottom">${key.delete_relation} </a></td>
          </tr>
        </pms:AuthTag>
      </table></td>
    </tr>
  </table>
</div>
</div>
</body>
</html>